﻿using System.Text.RegularExpressions;

namespace InfoSite.Tools.Text
{
	public class RegexHelper
	{
		//public static string PatternMail = @"([a-zA-Z0-9_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})";
		public static string PatternMail = "\\w+([-+.']\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*";

		public static bool IsEmail(string email)
		{
			return Regex.IsMatch(email, PatternMail);
		}
	}
}
